<script lang="ts" setup>
import { showToast } from '@/utils/common'

definePage({
  style: {
    navigationBarTitleText: '工作台',
  },
})

const current = ref<number>(0)

const swiperList = ref([
  '/static/images/banner/banner01.jpg',
  '/static/images/banner/banner02.jpg',
  '/static/images/banner/banner03.jpg',
])

function handleBuilding() {
  showToast('模块建设中~')
}
</script>

<template>
  <view class="page">
    <wd-swiper v-model:current="current" :list="swiperList" autoplay :indicator="{ type: 'dots-bar' }" image-mode="scaleToFill" height="150" />
    <uni-section title="系统管理" type="line" />
    <wd-grid clickable :column="4">
      <wd-grid-item icon="user" text="用户管理" @itemclick="handleBuilding" />
      <wd-grid-item icon="usergroup" text="角色管理" @itemclick="handleBuilding" />
      <wd-grid-item icon="view-module" text="菜单管理" @itemclick="handleBuilding" />
      <wd-grid-item icon="server" text="部门管理" @itemclick="handleBuilding" />
      <wd-grid-item icon="heart-filled" text="岗位管理" @itemclick="handleBuilding" />
      <wd-grid-item icon="view-list" text="字典管理" @itemclick="handleBuilding" />
      <wd-grid-item icon="setting1" text="参数设置" @itemclick="handleBuilding" />
      <wd-grid-item icon="chat1" text="通知公告" @itemclick="handleBuilding" />
      <wd-grid-item icon="wallet" text="日志管理" @itemclick="handleBuilding" />
    </wd-grid>
  </view>
</template>

<style lang="scss" scoped>
//
</style>
